package com.tobeface.sns.interfaces.util;

/**
 * 
 * @author loudyn
 * 
 */
public class JsonMessage {

	private boolean status;

	private int code;
	private String message;

	private JsonMessage() {}

	/**
	 * 
	 * @return
	 */
	public static JsonMessage one() {
		return new JsonMessage();
	}

	public boolean isStatus() {
		return status;
	}

	protected JsonMessage setStatus(boolean status) {
		this.status = status;
		return this;
	}

	public JsonMessage ok() {
		return setStatus(true);
	}

	public JsonMessage notOk() {
		return setStatus(false);
	}

	public int getCode() {
		return code;
	}
	
	public JsonMessage code(int code) {
		return setCode(code);
	}

	protected JsonMessage setCode(int code) {
		this.code = code;
		return this;
	}

	public String getMessage() {
		return message;
	}

	protected JsonMessage setMessage(String message) {
		this.message = message;
		return this;
	}

	public JsonMessage message(String message) {
		return setMessage(message);
	}

}
